Config variables¶
In the config files different variable type are allowed.
example
1 2 3 4 5 | [settings]
AnInteger = 12
AString = "This is a string"
AnArray = [1,2,3,4,5]
ADictionary = dict( a = 2, b = "C" )
|
in an included file, say files/etc/resolv.conf
1 2 3 4 5 | %header("##")
#foreach ns in nameservers
nameservers = %(ns)
#end
|
if and else¶
if-else branching is done like this
1 2 | [settings]
enable_logging = 1
|
in an included file, say files/etc/resolv.conf
1 2 3 4 5 6 7 | %header("##")
#if enable_logging
logging = 1
#else
logging = 0
#end
|
or, if _logging_ is default disabled, leave out the explicit _logging_ line.
1 2 3 4 5 | %header("##")
#if enable_logging
logging = 1
#end
|